#pragma once

#include <algorithm/analytical_model/algorithm/cuda/inter_op/Data.h>

#include <tuple>

namespace solar::cpu
{
    auto localToWorldRotate(const solar::cuda::inter_op::Float3& d_local,
                            const solar::cuda::inter_op::Float3& aligned_normal)
        -> solar::cuda::inter_op::Float3;
    auto translate(const solar::cuda::inter_op::Float3& d_in,
                   const solar::cuda::inter_op::Float3& translate_vector)
        -> solar::cuda::inter_op::Float3;
    auto rotateY(const solar::cuda::inter_op::Float3& origin,
                 const solar::cuda::inter_op::Float3& old_dir,
                 const solar::cuda::inter_op::Float3& new_dir) -> solar::cuda::inter_op::Float3;
    auto refractRay(const solar::cuda::inter_op::Float3& dir1,
                    const solar::cuda::inter_op::Float3& normal, float refract, float theta_1,
                    float theta_2) -> solar::cuda::inter_op::Float3;
    auto rayParallelogramIntersect(
        const solar::cuda::inter_op::Float3& orig, const solar::cuda::inter_op::Float3& dir,
        const solar::cuda::inter_op::Float3& A, const solar::cuda::inter_op::Float3& B,
        const solar::cuda::inter_op::Float3& C) -> std::tuple<float, float, float, bool>;
    auto intersect(const solar::cuda::inter_op::Float3& normal,
                   const solar::cuda::inter_op::Float3& plane_origin,
                   const solar::cuda::inter_op::Float3& vertex,
                   const solar::cuda::inter_op::Float3& direction)
        -> std::tuple<solar::cuda::inter_op::Float3, double>;
} // namespace solar::cpu
